/*    */ package com.hp.bon.logreverse.start;
/*    */ 
/*    */ import org.slf4j.Logger;
/*    */ import org.slf4j.LoggerFactory;
/*    */ import org.springframework.context.support.ClassPathXmlApplicationContext;
/*    */ 
/*    */ public class LogReverseStarter
/*    */ {
/* 17 */   private static final Logger logger = LoggerFactory.getLogger(LogReverseStarter.class);
/*    */ 
/* 19 */   private volatile boolean stopFlag = false;
/*    */ 
/* 25 */   private char _status = 'M';
/*    */ 
/* 64 */   private static ClassPathXmlApplicationContext ctx = null;
/*    */ 
/*    */   public void stop()
/*    */   {
/* 22 */     this.stopFlag = true;
/*    */   }
/*    */ 
/*    */   public void start(String[] args)
/*    */   {
/* 29 */     LogTool.installSLF4JBridge();
/*    */ 
/* 31 */     logger.info("*************** LogReverseStarter started ***************");
/* 32 */     String[] springXmls = { "spring-buz.xml" };
/* 33 */     ctx = new ClassPathXmlApplicationContext(springXmls);
/* 34 */     SpringContext.setCtx(ctx);
/* 35 */     ctx.start();
/*    */ 
/* 48 */     this._status = 'R';
/* 49 */     String pid = null;
/* 50 */     if (args.length >= 1)
/*    */     {
/* 52 */       pid = args[0];
/* 53 */       pid = pid.substring(pid.lastIndexOf('/') + 1);
/*    */     }
/* 55 */     SimpleDeamonAppHelper _daemon = new SimpleDeamonAppHelper(pid);
/* 56 */     _daemon.waitExit();
/* 57 */     this._status = 'M';
/* 58 */     logger.info("*************** LogReverseStarter Stopped ***************");
/* 59 */     this._status = 'F';
/* 60 */     ctx.destroy();
/* 61 */     System.exit(0);
/*    */   }
/*    */ 
/*    */   public static void main(String[] args)
/*    */   {
/* 70 */     LogReverseStarter start = new LogReverseStarter();
/* 71 */     start.start(args);
/*    */   }
/*    */ }

/* Location:           C:\Users\think\Desktop\sgw_2.1.jar
 * Qualified Name:     com.hp.bon.logreverse.start.LogReverseStarter
 * JD-Core Version:    0.6.1
 */